package com.iskyonline.skyonlieapp.controller;

import com.iskyonline.skyonlieapp.dto.ResponseDTO;
import com.iskyonline.skyonlieapp.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class BoController extends BaseController {

    @Autowired
    private UserService userService;

    @RequestMapping("/bo/login")
    public ResponseDTO boLogin(String username, String pwd, HttpSession session) {
        userService.login(username, pwd);
//        session.setAttribute("loginUser", boUser);
        return ResponseDTO.success();
    }

    @RequestMapping("/bo/home")
    public String home(HttpSession session) {
        return "home";
    }

    @RequestMapping("/bo/edit/shouye")
    public String shouye(HttpSession session) {
        return "shouye";
    }

}
